/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.srcptit.trainning.b1;

import java.util.Scanner;

/**
 *
 * @author Administrator
 */
public class NgocAnh_D12Cn6 {

    /**
     * @param args the command line arguments
     */
    
        public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
        long n;
        System.out.println("Nhập n = ");
        n = sc.nextLong();
        System.out.println((isPrime(n))?("Là số nguyên tố"):("Không phải số nguyên tố"));
    }
    static boolean isPrime(long n){
        if(n<2) return false;
        if(n==2) return true;
        if(n%2==0) return false;
        for(long i=3;i<(long)Math.sqrt(n);i++)
            if(n%i==0) return false;
        return true;
    }
    
}
